feat(db_engine_specs): Allow uploaded columns of dtype datetime to be stored as TIMESTAMP in the Hive schema#21850
Closed
GerbenvdHuizen wants to merge 3 commits intoapache:masterfrom
Closed
feat(db_engine_specs): Allow uploaded columns of dtype datetime to be stored as TIMESTAMP in the Hive schema#21850GerbenvdHuizen wants to merge 3 commits intoapache:masterfrom
GerbenvdHuizen wants to merge 3 commits intoapache:masterfrom
Conversation
… schema The views for uploading data files (csv, excel etc.) to a database have form options to pass and/or infer datetime columns. However, the hive `df_to_sql` method does not support storing datetime columns as TIMESTAMPs in the Hive schema. It would be a nice for the `_get_hive_type` functionality to at least support the basic `datetime64[ns]` dtype.
Contributor
There was a problem hiding this comment.
Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️
We hope to see you in our Slack community too!
Member
|
Thanks @GerbenvdHuizen for the PR. Would you mind formalizing your testing strategy as either a unit or integration test? |
Author
|
@john-bodley Added an integration test for all the schema definition types, since there didn't seem to be any yet. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21850 +/- ##
==========================================
- Coverage 66.18% 65.96% -0.22%
==========================================
Files 1805 1987 +182
Lines 69066 90890 +21824
Branches 7369 7369
==========================================
+ Hits 45712 59959 +14247
- Misses 21448 29025 +7577
Partials 1906 1906
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This was referenced Jul 6, 2023
This was referenced Nov 26, 2023
This was referenced Nov 28, 2023
This was referenced Feb 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
The views for uploading data files (csv, excel etc.) to a database have form options to pass and/or infer
datetimecolumns. However, the hivedf_to_sqlmethod does not support storingdatetimecolumns as TIMESTAMPs in the Hive schema. It would be a nice for the_get_hive_typefunctionality to at least support the basicdatetime64[ns]dtype.TESTING INSTRUCTIONS
The following steps require you to be able to upload files to a schema on Superset (
allow_file_upload) + use Hive as DB engine.Steps:
parse_datesis set to the timestamp column in your csv file andinfer_datetime_formatis set to true within the form.ADDITIONAL INFORMATION